<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script type="module">
    import { ref } from "./03_ref.js";

    // 处理基本类型
    // const count = ref(2)
    // console.log(count.value)
    // count.value = 3
    // console.log(count.value)
    
    // 处理对象类型
    const obj = {
      name: 'tom',
      age: 12
    }
    const user = ref(obj)
    console.log(user)
    console.log(user.value)
    console.log(user.value.age)
    // user.value = obj

  </script>
</body>
</html>